<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>openyelp</title>
<link rel="stylesheet" href="${siteurl}assets/css/www-pkg.css" />
<link rel="stylesheet" href="${siteurl}assets/css/biz_attribute.css" />
<link rel="stylesheet" href="${siteurl}assets/css/new_business.css" />

		[#include "/theme/yelp/common/scripts.html"]

<script type="text/javascript"
	src="http://api.map.baidu.com/api?v=2.0&ak=slXaZk8V8DUWQF2MQnuW4Q5x"></script>

</head>

<body class="country-hk logged-out ytype jquery" id="yelp_main_body"
	ryt13230="1">

	<div id="fb-root"></div>

	<div class="lang-en" id="wrap">



		[#include "/theme/yelp/common/header.html"]

		<div id="print-masthead">
			<img alt="Yelp" class="print-bkg-img"
				src="http://s3-media2.fl.yelpcdn.com/assets/2/www/img/b7e9d647188d/gfx/header_print.gif">
		</div>

		<span class="offscreen" id="page-content">&nbsp;</span>

		<div class="main-content-wrap main-content-wrap--box">

			<div class="content-container" id="super-container">


				<div id="alert-container"></div>


				<div class="container new-biz-container" data-component-bound="true">
					<h2>新增商店</h2>
					<p>請注意：在資料未被我們團隊確認並核實前，此商店資料頁將不會被顯示在搜尋結果上。</p>

					<form name="review_rate_form" method="POST" id="review_rate_form"
						class="biz-attrib-form new-biz-form yform"
						action="${siteurl}user/newbiz.htm">
						
								<input type="hidden" name="gps" id="gps"> 
		
								<input type="hidden"
									name="longitude" id="longitude">
									 <input type="hidden"
									name="latitude" id="latitude">
						<input type="hidden"
							value="3a07c037c69fa31c8f3a457fbfa0b6505564383d09bdf55266cd230d2cce0051"
							class="csrftok" name="csrftok">
						<div class="clearfix layout-block layout-right-rail">
							<div class="column column-alpha ">
								<div class="duplicate-business-suggestions hidden"
									data-component-bound="true">
									<p>
										<strong>你係咪諗緊</strong>
									</p>
									<div class="biz_matches"></div>
								</div>
								<ul>
									<li><label for="review-country">省份 </label> <select
										name="country" id="review-country" data-component-bound="true">
											<option value="TR">土耳其</option>
											<option value="DK">丹麥</option>
											<option value="BR">巴西</option>
									</select></li>
									<li class="js-example-business-name"><label for="name">
											商店名称 (中文) </label> <span class="placeholder-sub help-block">肯德基</span>

										<input type="text" value="" style="" size="35"
										placeholder="肯德基" name="name" maxlength="64" id="name"
										autocomplete="off"></li>


									<li><label for="alternate_names_en_primary">
											商店名称 （英文） </label> <span class="placeholder-sub help-block">Tsui
											Wah Restaurant</span> <input type="text" value="" style="" size="35"
										placeholder="Tsui Wah Restaurant"
										name="alternate_names_en_primary" maxlength="64"
										id="alternate_names_en_primary" autocomplete="off"></li>


									<li>
										<div class="js-example-business-address1">
											<label for="address1"> 地址 </label> <span
												class="placeholder-sub help-block">西安市莲湖区立新街12号
												Building, 7 Water St</span> <input type="text" value="" style=""
												size="35" placeholder="西安市莲湖区立新街12号"
												name="address" maxlength="64" id="address"
												autocomplete="off">

										</div>

									</li>

									<li class="js-example-business-zip"><label
										style="display: none;" for="location"> 城市 </label> <input
										type="text" value="" style="display: none;" size="35"
										name="location" maxlength="64" id="location"
										autocomplete="off"></li>




									<li class="js-example-business-phone"><label for="phone">
											电话号码 </label> <span class="placeholder-sub help-block">2525
											6338</span> <input type="text" value="" style="" size="35"
										placeholder="2525 6338" name="phone" maxlength="64" id="phone"
										autocomplete="off"></li>
									<li class="js-example-business-url"><label for="website">
											网址 </label> <span class="placeholder-sub help-block">http://www.companyaddress.com</span>

										<input type="text" value="" style="" size="35"
										placeholder="http://www.companyaddress.com.hk" name="website"
										maxlength="255" id="website" autocomplete="off"></li>
									<li class="BusinessCategoryYelp"><label
										for="category-select"> 分类 </label>
										<div class="js-categories-loading throbber"
											style="display: none;"></div>
										<div class="category-container" data-component-bound="true">
											<div class="category-picker">
												<div class="preselected-categories"></div>
												<div class="new-categories">
													<div class="new-category">
														<select class="category-select"><option></option>
															<option value="P6MRtofn4VSkJETn8d_k2g">健康及醫療</option>
															<option value="-Wdg7PAPC7AO84BVq3d6zA">夜生活</option>
															<option value="6S4gxERQGUVNKxZU1U4brg">大眾媒體</option>
															<option value="S7N-EmFUkKa65jM6FyEwXA">宗教組織</option>
															<option value="J6MYH4HwtOjsUzftjFWVMQ">家居服務</option>
															<option value="5MRO4EabvMRX_nGIFoKlgA">寵物</option>
															<option value="uRxDS-QtczDTxZdgGsoKsA">專業服務</option>
															<option value="4zEvkGAdAjYX3aXi2nWnSA">房地產</option>
															<option value="EpaBtDuengi9yq_XFiGQMg">政府與公共事務</option>
															<option value="rh--KBvCjYc99qQXGdGFhg">教育</option>
															<option value="V4soqpo1ILwryBvdGqBzlg">本地服務</option>
															<option value="rM-hum4O82w7AoGu3t8RMg">本地特色</option>
															<option value="RXvgMLJh6Rw_jpk1NPEi5A">汽車</option>
															<option value="a5TFEcmNBpVEyrmjux1TKA">活動策劃及統籌</option>
															<option value="uEAEgC7rnkwHWJ-HrlLvzA">美容及水療店</option>
															<option value="5tzK-iRL5mRiVDewUnE42A">藝術及娛樂</option>
															<option value="7h0tX4-I8qTj1YXWpRSAYw">購物</option>
															<option value="a3-znGameOY1scTqN8ZWXg">酒店及旅遊</option>
															<option value="vG0aon8u69C7vXaVqSelfA">金融服務</option>
															<option value="sa6Hv0hkKYMiTJ8yXgeQuw">食品</option>
															<option value="787jnoKe7bybdgxyBxiCfA">餐廳</option>
															<option value="ug7P79Dtl1m74IUHncPnew">體育消閒</option></select><a
															class="read-more remove-category" href="#">移除</a>
													</div>
												</div>
											</div>
											<a class="add-another-cat link-more" href="#">新增另一分類</a>
										</div> <a href="/developers/documentation/v2/category_list"
										target="_blank" class="see-all-categories link-more hidden"
										style="display: inline;">查看所有分類</a></li>
									<li class="newly-opened-biz"><label for="newly-opened-biz">
											<input type="checkbox" value="1" id="newly-opened-biz"
											name="opening_date_should_be_added"> 此商店啱啱開張或就快開張
									</label>
										<div
											class="js-opening-date-element business-date-picker hidden">
											你知唔知此商店會幾時向公眾開放？

											<div class="nested-icon-label date-picker"
												data-component-bound="true">
												<i class="i ig-common i-calendar-gray-common"></i> <input
													type="text" value="3/3/2015" title="yyyy/mm/dd"
													name="opening_date_month_day_year"
													id="opening_date_month_day_year"
													data-date-format="yyyy/MM/dd" class="date-input ">
											</div>

										</div></li>
									<li><label for="includes-review"> <input
											type="checkbox" checked="checked" value="1"
											id="includes-review" name="includes_review"> 為此商店寫評語
									</label> <input type="hidden" value="" name="review_base_language">
										<input type="hidden" value="newbiz" name="review_origin">


										<div class="review-widget review-widget--decorated" style="display: none;"
											data-component-bound="true">
											<a href="/guidelines" class="guidelines"
												data-component-bound="true">查閱我們的評語指引</a>

											<div class="review-stars clearfix">
												<fieldset class="star-rating-widget inline-block"
													data-component-bound="true">
													<legend class="offscreen">星級評分</legend>
													<ul class="stars-0">
														<li><input type="radio" value="1" name="rating"
															id="rating-1"> <label for="rating-1">1
																(唉！唔得。)</label></li>
														<li><input type="radio" value="2" name="rating"
															id="rating-2"> <label for="rating-2">2
																(一般般。有其它地方好過佢。)</label></li>
														<li><input type="radio" value="3" name="rating"
															id="rating-3"> <label for="rating-3">3
																(算係咁，可以收貨。)</label></li>
														<li><input type="radio" value="4" name="rating"
															id="rating-4"> <label for="rating-4">4
																(正！我鍾意。)</label></li>
														<li><input type="radio" value="5" name="rating"
															id="rating-5"> <label for="rating-5">5
																(Wow！佢有五星係有原因嘅！)</label></li>
													</ul>
													<p class="description"></p>
												</fieldset>

											</div>

											<div class="review-textbox">
												<input type="hidden" class="comment-field" name="comment">

												<textarea autocomplete="off" name="comment_js"
													class="review-textarea" data-component-bound="true">開始寫評語...</textarea>

												<div class="hidden-text-measurer"
													data-component-bound="true"></div>
											</div>
										</div></li>
									<li class="submit-review">
										<button class="ybtn ybtn-primary ytype" value="submit"
											type="submit" id="review-submit-button">
											<span>新增商店</span>
										</button> <span class="submit-in-progress hidden">新增商店中…</span> <input
										type="hidden" value="select" name="default_action"> <input
										type="hidden" id="rating-form-action" value="select"
										name="action_select">
									</li>
								</ul>


							</div>
							<div class="column column-beta ">
								<div class="map-suggestion-container">
									<div class="map-container yelp-map-container ieSucks">
										<div id="allmap" class="engine-container"
											style="background-color: rgb(229, 227, 223);"></div>
									</div>

									<div style="" class="js-change-location">
										<a
											class="i-wrap ig-wrap-common i-distance-marker-common-wrap show-locator-popup pull-right"
											href="javascript:;"><i
											class="i ig-common i-distance-marker-common"></i> 修正錯誤的地圖標記</a>
									</div>
								</div>
								<div style="display: none;">
									<div
										class="js-addbiz-popup-map-container addbiz-popup-map-container"
										data-component-bound="true">
										<div class="map-popup-info google-map">
											<p>
												拖曳並將別針放下在正確的地點上。 <br> 使用地圖上的工具放大地圖，查看細節。
											</p>
										</div>
										<div class="addbiz-popup-map popup-map">
											<div class="engine-container"
												style="background-color: rgb(229, 227, 223);"></div>
										</div>
									</div>

								</div>

							</div>
						</div>
					</form>

				</div>
			</div>
		</div>

		[#include "/theme/yelp/common/footer.html"]


	</div>

    <script type="text/javascript">
	// 百度地图API功能
	var map = new BMap.Map("allmap");
	// 编写自定义函数,创建标注
	function addMarker(point) {
		var marker = new BMap.Marker(point);
		map.addOverlay(marker);
	}
	//var marker = new BMap.Marker(point);
	//map.addOverlay(marker);

	var top_left_control = new BMap.ScaleControl({
		anchor : BMAP_ANCHOR_TOP_LEFT
	});// 左上角，添加比例尺
	var top_left_navigation = new BMap.NavigationControl(); //左上角，添加默认缩放平移控件
	var top_right_navigation = new BMap.NavigationControl({
		anchor : BMAP_ANCHOR_TOP_RIGHT,
		type : BMAP_NAVIGATION_CONTROL_SMALL
	}); //右上角，仅包含平移和缩放按钮
	/*缩放控件type有四种类型:
	BMAP_NAVIGATION_CONTROL_SMALL：仅包含平移和缩放按钮；BMAP_NAVIGATION_CONTROL_PAN:仅包含平移按钮；BMAP_NAVIGATION_CONTROL_ZOOM：仅包含缩放按钮*/

	//添加控件和比例尺
	function add_control() {
		map.addControl(top_left_control);
		//map.addControl(top_left_navigation);
		map.addControl(top_right_navigation);
	}
	//移除控件和比例尺
	function delete_control() {
		map.removeControl(top_left_control);
		map.removeControl(top_left_navigation);
		map.removeControl(top_right_navigation);
	}
	add_control();

	// 添加带有定位的导航控件
	var navigationControl = new BMap.NavigationControl({
		// 靠左上角位置
		anchor : BMAP_ANCHOR_TOP_LEFT,
		// LARGE类型
		type : BMAP_NAVIGATION_CONTROL_LARGE,
		// 启用显示定位
		enableGeolocation : true
	});
	map.addControl(navigationControl);
	// 添加定位控件
	var geolocationControl = new BMap.GeolocationControl();
	geolocationControl.addEventListener("locationSuccess", function(e) {
		// 定位成功事件
		var address = '';
		address += e.addressComponent.province;
		address += e.addressComponent.city;
		address += e.addressComponent.district;
		address += e.addressComponent.street;
		address += e.addressComponent.streetNumber;
		//alert("当前定位地址为：" + address);
	});
	geolocationControl.addEventListener("locationError", function(e) {
		// 定位失败事件
		// alert(e.message);
	});
	map.addControl(geolocationControl);

	var opts = {
		width : 250, // 信息窗口宽度
		height : 80, // 信息窗口高度
		title : "信息窗口", // 信息窗口标题
		enableMessage : true
	//设置允许信息窗发送短息
	};
	var content = "门道网";
	// marker.addEventListener("click",function(e){openInfo(content,e)});
	function openInfo(content, e) {
		var p = e.target;
		var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
		var infoWindow = new BMap.InfoWindow(content, opts); // 创建信息窗口对象 
		map.openInfoWindow(infoWindow, point); //开启信息窗口
	}

	// 创建地址解析器实例
	function geowork() {
		var myGeo = new BMap.Geocoder();
		// 将地址解析结果显示在地图上,并调整地图视野
		myGeo.getPoint("西安市", function(point) {
			if (point) {
				map.centerAndZoom(point, 16);
				//map.addOverlay(new BMap.Marker(point));
			}
		}, "西安市");
	}
	function golocal() {

		var geolocation = new BMap.Geolocation();
		geolocation.getCurrentPosition(function(r) {
			if (this.getStatus() == BMAP_STATUS_SUCCESS) {
				//var mk = new BMap.Marker(r.point);
				//map.addOverlay(mk);
				map.panTo(r.point);
				//alert('您的位置：'+r.point.lng+','+r.point.lat);
			} else {
				geowork();
			}
		}, {
			enableHighAccuracy : true
		})

	}
	var geoc = new BMap.Geocoder();
	map.addEventListener("click", function(e) {

		$("#gps").val(e.point.lng + "," + e.point.lat);
		$("#longitude").val(e.point.lng + "");
		$("#latitude").val(e.point.lat + "");
		map.clearOverlays();
		var marker = new BMap.Marker(e.point); // 创建标注
		map.addOverlay(marker);
		marker.setAnimation(BMAP_ANIMATION_BOUNCE);
		geoc.getLocation(e.point, function(rs) {
			var addComp = rs.addressComponents;
			var addres = addComp.city + ""
					+ addComp.district + "" + addComp.street + ""
					+ addComp.streetNumber;
		var add=$("#address").val();
		$("#address").val(addres);
		 if(add.length<=1){
		    $("#address").val(addres);
		    //$("#cityname").val(addComp.city);
			//$("#townname").val(addComp.district);
			//$("#townid").val(addComp.district);
		 }
			
		});
	});

	geowork();
</script>

</body>

</html>